#!/usr/bin/perl

use strict;
use warnings;

use Cwd 'abs_path';
use File::Basename;

my $version = "1.1.1";
my $build_at = '';

my $OS = $^O;
my $DS = $OS eq 'MSWin32'? '\\' : '/';
my $ROOT_PATH = dirname(abs_path($0));

require lib;
lib->import("${ROOT_PATH}${DS}libs");
lib->import("${ROOT_PATH}${DS}app");

require Utils;
Utils->import(qw(dd in_array hash_key_exists kebab_to_camel));

require CommandRunner;

require Commands::Help;

sub main {
    my @args = @ARGV;
    my @commands = (
        {
            name => 'help',
            description => '显示帮助信息'
        },
        {
            name => 'connection',
            description => '连接相关操作'
        },
        {
            name => 'validation',
            description => '验证相关操作'
        }
    );
    CommandRunner::mountCommand(\@commands);
    CommandRunner::execute(@args);
}

main();

1;

__END__
